const express = require("express");
const multer = require("multer");

// 创建app对象
const app = express();

// express内置插件
app.use(express.json());
app.use(express.urlencoded({ extended: false })); // 解析formdata

// multer插件
const formdata = multer();

app.post("/login", formdata.any(), (req, res, next) => {
  console.log(req.body);
  res.end("login success~");
});

app.listen(9000, () => {
  console.log("服务器启动成功~");
});
